package com.hdoit.kylin.logical.experiment.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Entity;
import javax.persistence.Transient;

import com.tennetcn.common.aop.CommonApplicationContextUtil;
import com.tennetcn.common.message.LoginModel;
import com.tennetcn.common.message.ModelBase;
import com.tennetcn.component.web.SessionWebFactory;

/**
 * @author luozhicheng
 * @email
 * @createtime 2017年07月18日 19:55:23
 * @comment
 */
@Entity
@Table(name = "project_experiment")
public class Experiment extends ModelBase {
	// 实验id
	@Id
	@Column(name = "experimentId")
	private String experimentId;
	// 实验名
	@Column(name = "experimentName")
	private String experimentName;
	// 实验描述
	@Column(name = "experimentComment")
	private String experimentComment;
	// 实验负责人 
	@Column(name = "employeeId")
	private String employeeId;
	// 实验时间
	@Column(name = "experimentDate")
	private Date experimentDate;
	// 实验地点
	@Column(name = "experimentAddress")
	private String experimentAddress;
	// 课题id
	@Column(name = "projectId")
	private String projectId;
	
	@Column(name="experimentReportUUID")
	private String experimentReportUUID;
	
	@Column(name="experimentReportName")
	private String experimentReportName;
	
	public String getExperimentReportUUID() {
		return experimentReportUUID;
	}

	public void setExperimentReportUUID(String experimentReport) {
		this.experimentReportUUID = experimentReport;
	}

	@Transient
	private String experimentDatas;
	
	@Transient
	private String employeeName;
	//项目名
	@Transient
	private String projectName;
	
	// 参与人员
	@Transient
	private String employeeIds;

    public Experiment() {
		this.employeeName = getLoginModel().getLoginName();
	}
    
    private LoginModel getLoginModel(){
    	return CommonApplicationContextUtil.getCurrentContext().getBean(SessionWebFactory.class).getCurrentLogin();
    }
	
	public String getEmployeeIds() {
		return employeeIds;
	}

	public void setEmployeeIds(String employeeIds) {
		this.employeeIds = employeeIds;
	}

	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public String getExperimentId() {
		return this.experimentId;
	}

	public void setExperimentId(String experimentId) {
		this.experimentId = experimentId;
	}

	public String getExperimentName() {
		return this.experimentName;
	}

	public void setExperimentName(String experimentName) {
		this.experimentName = experimentName;
	}

	public String getExperimentComment() {
		return this.experimentComment;
	}

	public void setExperimentComment(String experimentComment) {
		this.experimentComment = experimentComment;
	}

	public String getEmployeeId() {
		return employeeId;
	}

	public void setEmployeeId(String employeeId) {
		this.employeeId = employeeId;
	}

	public Date getExperimentDate() {
		return this.experimentDate;
	}

	public void setExperimentDate(Date experimentDate) {
		this.experimentDate = experimentDate;
	}

	public String getExperimentAddress() {
		return this.experimentAddress;
	}

	public void setExperimentAddress(String experimentAddress) {
		this.experimentAddress = experimentAddress;
	}

	public String getProjectId() {
		return this.projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	public String getEmployeeName() {
		return employeeName;
	}

	public void setEmployeeName(String employeeName) {
		this.employeeName = employeeName;
	}

	public String getExperimentReportName() {
		return experimentReportName;
	}

	public void setExperimentReportName(String experimentReportName) {
		this.experimentReportName = experimentReportName;
	}

}